const JWT = require('jsonwebtoken');
const md5 = require('md5');

module.exports = (token)=>{
    const res = JWT.verify(token.split(' ')[1], md5(process.env.JWT_SECRET));
    return res;
};
